-- GENERATED SPELL FOR [Arcane Anomaly] --


function spell0_16488(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(29885,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16488', 1000, 1)
end

function spell1_16488(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(29883,pUnit)
pUnit:RegisterEvent('Sorts_16488', 1253, 1)
end

function spell2_16488(pUnit, Event) --@Loose Mana,n/a--
pUnit:FullCastSpellOnTarget(29882,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16488', 20000, 1)
end

function spell3_16488(pUnit, Event) --@Mana Shield,Self--
pUnit:FullCastSpellOnTarget(29880,pUnit)
pUnit:RegisterEvent('Sorts_16488', 617, 1)
end

function Sorts_16488(pUnit, Event)
local choix_sorts_16488 = math.random(0, 3)
if choix_sorts_16488 == 0 then
pUnit:RegisterEvent('spell0_16488', 1, 1)
end
if choix_sorts_16488 == 1 then
pUnit:RegisterEvent('spell1_16488', 1, 1)
end
if choix_sorts_16488 == 2 then
pUnit:RegisterEvent('spell2_16488', 1, 1)
end
if choix_sorts_16488 == 3 then
pUnit:RegisterEvent('spell3_16488', 1, 1)
end
end

function mob16488_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16488', math.random(1500, 3000), 1)
end

function mob16488_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16488_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16488_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16488, 1, 'mob16488_Action')
RegisterUnitEvent(16488, 2, 'mob16488_Leave')
RegisterUnitEvent(16488, 3, 'mob16488_Kill')
RegisterUnitEvent(16488, 4, 'mob16488_Die')
